<?php /* Template Name: FAQ */ ?>

<?php get_header(); ?>
    
    
<?php 

    //SETTTINGS
    $result_cmb_kodax_faq = get_post_meta($post->ID, 'cmb_kodax_faq', true);

?>


        <!-- start main-container -->
        <div class="main-container">
            <!-- start main wrapper -->
            <div class="main wrapper clearfix">
                <!-- start main-content -->
                <div class="main-content full">
                    <!-- clearfix -->
                    <div class="clearfix">

                        <!-- MAIN LOOP -->
                        <?php while ( have_posts() ) : the_post(); ?>

        	                	<h1><?php the_title(); ?></h1>

                                <?php the_content(); ?>
        	                	
        	                	<?php 

                                    if (isset($result_cmb_kodax_faq['show_knowledge_base'])) {
                                        echo '<ul class="toggle">';
                                        for ($i = 0; $i < count($result_cmb_kodax_faq['questions']); $i++) {  
                                        ?>
                                            
                                                <!-- Toggle -->
                                                <li>
                                                    <a href='#' class='toggle-btn'><?php echo $result_cmb_kodax_faq['questions'][$i]['question']; ?></a>

                                                    <div class='toggle-content'>
                                                        <p><?php echo do_shortcode($result_cmb_kodax_faq['questions'][$i]['answer']); ?></p>
                                                    </div>

                                                </li>
                                           
                                        <?php
                                        }    
                                        echo '</ul>';
                                    }

                                 ?>

        	                	
        	                	
                                <?php 
                                    if (isset($result_cmb_kodax_faq['show_cta'])) {
                                    ?>
                                        <div class="message promo clearfix">
                                            <?php echo do_shortcode($result_cmb_kodax_faq['cta']); ?>
                                        </div>
                                            
                                    <?php    
                                    } 
                                ?>

                                <?php 
                                    if (isset($result_cmb_kodax_faq['show_faq'])) {
                                    ?>

                                        <hr/>
                                        <!-- Start FAQ -->
                                        <div class="clearfix">
                                            <h3><?php echo $result_cmb_kodax_faq['faq_section_title']; ?></h3>
                                            <?php echo do_shortcode($result_cmb_kodax_faq['faq']); ?>
                                        </div>
                                            
                                    <?php    
                                    } 
                                ?>
        	                	
        	            

                        <?php endwhile; ?>
                        <!-- END LOOP -->

                    </div>
                    <!-- end clearfix -->    
                </div>
                <!-- end main-content -->              
            </div>
            <!-- end main wrapper -->
        </div> 
        <!-- end main-container -->
 

    		
    	
    	
<?php get_footer(); ?>
